<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:composite="http://java.sun.com/jsf/composite">
      
	<composite:interface>
		<composite:attribute name="id" />
		<composite:attribute name="list"/>
		<composite:attribute name="widgetVar"/>
		<composite:attribute name="header" />
		<composite:attribute name="controller"/>
		<composite:attribute name="show"/>
		<composite:attribute name="selecionada"/>
		<composite:attribute name="selecionadaReferencia"/>
		<composite:attribute name="update"/>
	</composite:interface>
	
	<composite:implementation>

	       <p:dialog id="#{cc.attrs.id}" header="#{bundle.titleModalAlert}" widgetVar="#{cc.attrs.widgetVar}" 
	       			 modal="true" height="300" width="500" rendered="#{cc.attrs.show}">
				<h:outputText value ="#{bundle.msgDefaultModalAlert}" />
				<br />
				<div>
					<p:dataTable value="#{cc.attrs.list}" var="lista">  
				        <p:column headerText="">  
				            <h:outputText value="#{lista.key}" rendered="#{not empty lista.value}"/>  
				        </p:column>  
				  
				        <p:column headerText="">  
				            <p:dataList value="#{lista.value}" itemType="none" var="item" styleClass="modal">  
							    <h:outputText value="#{item}" styleClass="modal" rendered="#{not empty lista.value}"/>
							</p:dataList> 
				        </p:column>  
				    </p:dataTable>  
				</div>
				<br /><br />
				<div align="center" >
					<p:commandButton title="Fechar" value="Fechar" onclick="#{cc.attrs.widgetVar}.close();" />
				</div>
			</p:dialog>
			
			<p:confirmDialog message="#{bundle.respostaConfirm}  ?" modal="true" rendered="#{not cc.attrs.show}"
			closeOnEscape="false" closable="false" header="#{bundle.respostaConfirmTitle}" widgetVar="#{cc.attrs.widgetVar}">
			
				<p:commandButton value="#{bundle.respostaSim}" oncomplete="#{cc.attrs.widgetVar}.hide()" actionListener="#{cc.attrs.controller.deleteGeneric}" update="#{cc.attrs.update}"/>
				<p:commandButton value="#{bundle.respostaNao}" oncomplete="#{cc.attrs.widgetVar}.hide()"  />
			
			
			</p:confirmDialog>
		    
	</composite:implementation>
      
</html>